home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / sound / speech recognition sample / language.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.8 KB  |  64 lines

  1. /*
  2.     File:        Language.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by:     
  7.  
  8.     Copyright:    Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/2/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #ifndef __LANGUAGE__
  24. #define __LANGUAGE__
  25.  
  26. #include <Resources.h>
  27. #include <Speech.h>
  28. #include <String.h>
  29. #include <TextUtils.h>
  30.  
  31. #ifndef __STRUCT__
  32. #include "Struct.h"
  33. #endif
  34.  
  35. #ifndef __SPEAKINGERRORS__
  36. #include "Speaking_Errors.h"
  37. #endif
  38.  
  39. #define kBaseResID        128
  40. #define kLanguageRes    'STR#'
  41. #define kTREEType        'LANG'
  42.  
  43. OSErr        MakeNewLanguage            (SpeechInfoPtr theSpeechInfo);
  44. OSErr        AddStringsToLanguage    (SpeechInfoPtr theSpeechInfo,
  45.                                     LanguageModelListPtr currentLang,
  46.                                     short resID);
  47. OSErr        ReadInLanguages            (SpeechInfoPtr theSpeechInfo);
  48. OSErr        GetTREERes                (TREEResourcePtr *TREEResPtr,
  49.                                     short resID,
  50.                                     short index,
  51.                                     short *onlySubPath);
  52. OSErr        RegisterCommand            (TREEResourcePtr theTREEResPtr,
  53.                                     CommandPtr *theCommand);
  54. OSErr        GetFlagsFromTREE        (long *theFlags,
  55.                                     TREEResourcePtr theTREEResPtr);
  56. OSErr        GetTypeFromTREE            (OSType *theType,
  57.                                     TREEResourcePtr theTREEResPtr);
  58. OSErr        GetIDFromTREE            (long *theID,
  59.                                     TREEResourcePtr theTREEResPtr);
  60. OSErr        GetStringFromTREE        (Str255 theString,
  61.                                     TREEResourcePtr theTREEResPtr);
  62.  
  63. #endif
  64.